<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            background-color: deeppink;
            /* 使用动画 */
            /* 动画名字 */
            border-radius: 10px;
            animation-name: myani;
            /* 动画时长 */
            animation-duration: 3s;
            animation-iteration-count: infinite;
            animation-direction: alternate;
            animation-timing-function: linear;
        }
        @keyframes myani {
            0%{
                 width: 100px;
                height: 100px;
                background-color: deeppink; 
                transform: translateX(0) rotate(0deg) ;
            }
           100%{
                width: 200px;
                height: 200px;
                background-color: dodgerblue;
                transform: translateX(500px) rotate(360deg) ;
           }
            
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>